package com.example.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@Table(name = "receipts_details")
public class ReceiptsDetails {
    /**
     * 单据详情ID
     */
    @Id
    private Integer rdid;

    /**
     * 单据ID
     */
    private Integer rid;

    /**
     * 产品ID
     */
    private Integer gid;
    /**
     * 产品名
     */
    @Transient
    private String name;

    /**
     * 数量
     */
    private Integer number;

    /**
     * 创建时间
     */

    private Date createTime;

    /**
     * 生产日期时间
     */
    private Date updateTime;

    /**
     * 进价
     */
    private BigDecimal price;

    private BigDecimal totalPrice;

    public ReceiptsDetails(Integer gid, Integer number, BigDecimal price) {
        this.gid = gid;
        this.number = number;
        this.price = price;
    }
}
